x86emul: reduce CMPXCHG{8,16}B footprint and casting
authorJan Beulich <jbeulich@suse.com>
Fri, 16 Dec 2016 13:36:36 +0000 (14:36 +0100)
committerJan Beulich <jbeulich@suse.com>
Fri, 16 Dec 2016 13:36:36 +0000 (14:36 +0100)
commitf1785a94a2265fbbed40855ecabf94b156c6a80e
tree06680cfcf160adc0e2767d1628e0ded9244884a7
parentd04c9b144857cde52207141dbc141dd5c6290768
x86emul: reduce CMPXCHG{8,16}B footprint and casting

Re-use an existing stack variable (reducing stack footprint, which also
results in smaller code due to some stack accesses no longer needing a
32-bit displacement), at once using a union instead of casts. Also
switch to rex_prefix based conditionals instead of op_bytes ones.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
tools/tests/x86_emulator/x86_emulate.h
xen/arch/x86/x86_emulate/x86_emulate.c